package day05;

import java.util.Scanner;

public class Addition {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int score = 0;
        for (int i=1;i<=10;i++){
            int a,b,c;
            a= (int)(Math.random()*100);
            b= (int)(Math.random()*100);
            System.out.println(a+"+"+b+"=");
            System.out.println("相加为：");
            c = scan.nextInt();
            if (c==-1){
                break;
            }
            else if (c==a+b){
                System.out.println("对了");
                score+=10;

            }else{
                System.out.println("傻逼");
            }

        }
        System.out.println("总分为"+score);
    }
}
